package com.iqiyi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.iqiyi.domain.User;
import com.iqiyi.service.UserService;
import com.iqiyi.mapper.UserMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 11757
* @description 针对表【user】的数据库操作Service实现
* @createDate 2022-12-17 12:14:51
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Override
    public User findUserById(int uid) {
        LambdaQueryWrapper<User> userWrapper = Wrappers.lambdaQuery();
        userWrapper.eq(User::getUid,uid);
        User user = this.getOne(userWrapper);
        return user;
    }
}




